﻿using Jst.Application.Contracts.IApplication.Users;
using Jst.Application.Contracts.IApplication.Users.Vos;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace Jst.EntityFrameworkCore.Controllers
{
    [ApiVersion("1.0")]
    [Route("api/[controller]")]
    [Authorize]
    [ApiController]
    [ApiExplorerSettings(GroupName = "v1")]
    public class UserApp : ControllerBase
    {
        private readonly IUserAppService _userAppService;

        public UserApp(IUserAppService userAppService)
        {
            _userAppService = userAppService;
        }

        [HttpGet]
        public async Task<UserVo> GetAsync(long id)=>await _userAppService.GetAsync(id);
    }
}
